package com.longrise.android.byjk.widget.view;

import android.content.Context;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;

import com.longrise.android.byjk.R;
import com.longrise.common.utils.AppUtil;

/**
 * Created by callxkj on 2017/2/27.
 * 保宝定制的swipeRefreshLayout 便于动态配置
 */

public class BBswipeRefreshLayout extends SwipeRefreshLayout {

    public BBswipeRefreshLayout(Context context) {
        this(context,null);
    }

    public BBswipeRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    /**
     * 初始化颜色大小下拉距离等..
     */
    private void init(Context context){
      //setProgressViewOffset();
      setColorSchemeColors(AppUtil.getColor(R.color.swipe_refresh_color1),
              AppUtil.getColor(R.color.swipe_refresh_color2),
              AppUtil.getColor(R.color.swipe_refresh_color3),
              AppUtil.getColor(R.color.swipe_refresh_color4));
    }
}
